<?php ob_start(); ?> 
<?php header ('Content-type: text/xml; charset=utf-8'); ?>     

<?php include "constants.inc" ?>

<?php include "classes.inc" ?>

<?php session_start(); ?>


<?php

function storeDepartment($dep) {

	if (isset($dep)) {

    // TODO validate value

    $_SESSION['dep'] = $dep;

    return '1';

  }

  return '0';

}

?>

<response>

  <method>storeDepartment</method>

  <result><?php

    echo storeDepartment($_GET['dep'])?></result>

</response>